package com.ftg.learn.chapter8.pattern.singleton.innerclass.lambda;

import com.ftg.learn.chapter04.Dog;

/**
 * 消费型
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/8/1 下午2:25
 */
public interface MyConsumer {

    void buy(Dog str);

    public static void main(String[] args) {
        MyConsumer m = x-> System.out.println(x.getName());

        Dog d = new Dog();
        d.setName("张三");

        m.buy(d);
    }

}
